<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <SCRIPT src="jquery-1.7.2.min.js" type="text/javascript">
    </SCRIPT>
    <SCRIPT src="jquery.tmpl.js" type="text/javascript">
    </SCRIPT>
</head>

<body>
    <div id="fromhtml"> </div>
    <script id="miantmpl" type="text/x-jquery-tmpl">
        <template>
<div style="width: ${fwidth}px;height: ${fheight}px;backgroundImage:url(${backgroundurl});`" class="chart-panel"  >
                    {{each layoutitemlist}}
                    <el-col :span="${span}" >
                        <el-col :span="24" style="padding-left: 10px;">
                        {{each widgetForm.list}}
                        {{tmpl($value) '#panelcodetmpl'}}
                        {{/each}}
                        </el-col>
                    </el-col>
                    {{/each}}

                    {{each layerlist}}
                    {{tmpl($value) '#dialogcodetmpl'}}
                    {{/each}}

                <br style="clear:both;" />

        </div>
        </template>
    </script>
    <script id="panelcodetmpl" type="type/x-jquery-tmpl">
        {{if type=="gridPanel"}}
            {{each columns}}
            <el-col :span="24" {{html options.tagattr}}>
                {{tmpl($value) '#fromcodetmpl'}}
            </el-col>
            {{/each}}

        {{else type=="tabs"}}
            <el-col :span="24">
                <el-tabs default-active-key="1">
                    {{each options.panelist}}
                    <el-tab-pane label="${title}"
                    key="${$index+1}" {{html options.tagattr}}>
                        <el-row  >
                            {{each  columns}}

                                        {{tmpl($value) '#fromcodetmpl'}}

                            {{/each}}
                        </el-row>
                    </el-tab-pane>
                    {{/each}}
                </el-tabs>
            </el-col>
            {{else type=="collapse"}}
            <el-col :span="24">
                <a-collapse default-active-key="1" {{html options.tagattr}}>
                    {{each options.panelist}}
                    <a-collapse-panel   key="${$index+1}" header="${title}">
                        <el-row  >
                            {{each  columns}}
                                        {{tmpl($value) '#fromcodetmpl'}}
                            {{/each}}
                        </el-row>
                    </a-collapse-panel>
                    {{/each}}
                </a-collapse>
            </el-col>
            {{else}}
            {{/if}}
    </script>
    <script id="dialogcodetmpl" type="type/x-jquery-tmpl">
        <zhlDialog title="${options.labelTitle}"
                   ref="${options.idPrefix}"
                   width="${options.width.indexOf("%")<0&&options.width.indexOf("px")<0?(options.width+"px"):options.width}"
                   height=""
                   class="my-dialog">

                    <div style="min-height:${options.height.indexOf("%")<0 &&options.height.indexOf("px")<0?(options.height+"px"):options.height}">
                                                                                                 {{each list}}
                                                                                                 {{tmpl($value) '#panelcodetmpl'}}
                                                                                                 {{/each}}
                      </div>
        		   {{if options.layertype == 'center'}}
        <el-row class="filterbottom">
        <div class="operation">
        {{each options.buttons}}
                    <el-button
                      type="${options.butType}"
                      style="margin-right:10px"
                      size="${options.butsize}"
                      icon="${options.icon}"
        ${getevent($value)} {{html options.tagattr}}
                      >${ options.labelTitle }</el-button
                    >
        {{/each}}
                </div>  </div>
        {{/if}}
        </zhlDialog>
    </script>
    <!-- PC端明细渲染 -->
    <script id="wmpDetailcodetmpl" type="type/x-jquery-tmpl">
        {{if type == 'lable'}}
                <el-table-column prop="${dataIndex}"
                                 label="${title}" >
         <template slot-scope="scope">
        ${"{{scope.row."+dataIndex}}}
        </template>
         </el-table-column>
        {{else}}
                <el-table-column prop="${dataIndex}"
                                 label="${title}"   width="${width}">
         <template slot="header" slot-scope="scope">
  <span class="${ options.required == true?"required":"" }" >${title }</span>
         </template>
                    <template slot-scope="scope">
         <el-form-item label=""  :prop="'${parentControlId}.'+scope.$index+'.${dataIndex}'" :rules="rules.${options.filed}"   label-width="0px" >
                            {{if  type=="input"}}
                            <el-input placeholder="请输入${ title }内容" ${options.disabled?"disabled":""} v-model="scope.row.${dataIndex}" maxlength="${options.dataLength}" ${getevent($data)} {{html options.tagattr}}></el-input>
                           {{else type == 'textarea'}}
                            <el-input type="textarea"
                                      rows="2"
                                      placeholder="请输入${ title }内容" ${options.disabled?"disabled":""} v-model="scope.row.${dataIndex}" maxlength="${options.dataLength}" ${getevent($data)} {{html options.tagattr}}>
                            </el-input>
                            {{else type == 'select'}}
                        <el-select placeholder="请选择${ title}" ${options.disabled?"disabled":""} v-model="scope.row.${dataIndex}" ${getevent($data)} {{html options.tagattr}} defaultFirstOption="false">
                            {{if options.isRemote==true}}
                              <el-option  v-for="(item,index) in controlData.${dataIndex}" :key="index"
                                           :label="item.${options.labelText}"
                                          :value="item.${options.labelValue}">
                                </el-option>
                            {{else}}
                                              {{each options.options}}
                                                <el-option label="${label}"
                                                           value="${label}">
                                                </el-option>
                                                {{/each}}
                            {{/if}}
                        </el-select>
                            {{else type == 'date'}}
                                {{if options.modeltype != 'range'}}
                             <el-date-picker placeholder="${options.placeholder}"
                                                format="${options.format}"
                                                value-format="${options.format}"
                                                type="${options.modeltype}"
                                                style="width: 100%;"
                                                ${options.disabled?"disabled":""} v-model="scope.row.${dataIndex}" ${getevent($data)} {{html options.tagattr}} />
                                {{else options.modeltype == 'range'}}
                                <el-date-picker
                                  v-model="scope.row.${dataIndex}"
                                  type="monthrange"
                                  format="${options.format}"
                                  value-format="${options.format}"
                                  range-separator="至"
                                  start-placeholder="${options.placeholder}"
                                  style="width: 100%;"
                                  end-placeholder="${options.placeholder}" ${getevent($data)} {{html options.tagattr}} ${options.disabled?"disabled":""}>
                                </el-date-picker>
                                {{/if}}
                            {{else type == 'radio'}}
                            <el-radio-group size="mini"
                                            style="line-height:43px; display:block;" ${options.disabled?"disabled":""} v-model="scope.row.${dataIndex}" ${getevent($data)} {{html options.tagattr}}>
                               {{if options.isRemote==true}}
           <el-radio  v-for="(item,index) in controlData.${options.filed}" :key="index"
                       :label="item.${options.labelText}"
                      :value="item.${options.labelValue}">
            </el-radio>
        {{else}}
                              {{each options.options}}
                                <el-radio style="inline"
                                          label="${label}">${ label }</el-radio>
                                {{/each}}
        {{/if}}
                            </el-radio-group>
                            {{else type == 'checkbox'}}
                            <el-checkbox-group size="mini"
                                               style="line-height:43px;" ${options.disabled?"disabled":""} v-model="scope.row.${dataIndex}" ${getevent($data)} {{html options.tagattr}}>
                               {{if options.isRemote==true}}
           <el-checkbox  v-for="(item,index) in controlData.${dataIndex}" :key="index"
                       :label="item.${options.labelText}"
                      :value="item.${options.labelValue}">
            </el-checkbox>
                             {{else}}
                              {{each options.options}}
                                <el-checkbox style="inline"
                                             label="${label}" >${label}</el-checkbox>
                                {{/each}}
                            {{/if}}
                            </el-checkbox-group>
                            {{else type == 'editor'}}

                            {{else type == 'blank'}}

                            {{else type == 'rate'}}
                            <el-rate ${options.readonly?"readonly='true' ":" "} v-model="scope.row.${dataIndex}" ${getevent($data)} {{html options.tagattr}}></el-rate>
                            {{else type == 'inputnumber'}}
                            <el-input-number ${options.disabled?"disabled":""}
                                             :min="${options.min}"
                                             :max="${options.max}"
                                             label="${options.describe}"
                                             :step="${options.step}"
                                            v-model="scope.row.${dataIndex}" ${getevent($data)} {{html options.tagattr}}></el-input-number>
                            {{else type == 'timepicker'}}
                                           <el-time-select
                                           v-model="scope.row.${dataIndex}"
                                           :picker-options="{
                                             start: '08:30',
                                             step: '00:15',
                                             end: '18:30'
                                           }"
                                           ${options.disabled?"disabled":""}
                                           ${getevent($data)} {{html options.tagattr}}
                                           placeholder="选择时间">
                            {{else type == 'user'}}
                            <a-input-search placeholder="input search text"   {{html options.tagattr}} />
                            {{else type == 'department'}}
                            <input type="text" placeholder="" class="form-control" {{html options.tagattr}}><i aria-hidden="true" class="fa fa-search" style="position: absolute; right: 25px; top: 15px;"></i>
                            {{else type == 'project'}}
                            <input type="text" placeholder="" class="form-control" {{html options.tagattr}}><i aria-hidden="true" class="fa fa-search" style="position: absolute; right: 25px; top: 15px;"></i>
                            {{else type == 'cost'}}
                            <input type="text" placeholder="" class="form-control" {{html options.tagattr}}><i aria-hidden="true" class="fa fa-search" style="position: absolute; right: 25px; top: 15px;"></i>
                            {{else type == 'choose'}}
                            <input type="text" placeholder="" class="form-control" {{html options.tagattr}}><i aria-hidden="true" class="fa fa-search" style="position: absolute; right: 25px; top: 15px;"></i>
                            {{else  type == 'button' }}
                            {{each options.buttons}}
                        <el-button style="margin-left:5px;"   ${getevent($data)} {{html options.tagattr}}   type="${options.butType}"
                      size="${options.butsize}"
                      icon="${options.icon}" :plain="${options.isplain}"
                      :round="${options.isround}"
                      :circle="${options.iscircle}"
                      :disabled="${options.disabled}">
                            ${options.labelTitle}
                        </el-button>
                            {{/each}}
                            {{/if}}
         </el-form-item>
                    </template>
                </el-table-column>
        {{/if}}
    </script>
    <!-- PC端明细列表渲染 -->
    <script id="listviewPCcodetmpl" type="type/x-jquery-tmpl">
     <el-col :xs="24" :md="24" :lg="24" v-if="deviceMode==='pc'">
         <el-button style="margin-left:5px;margin-top: 5px;" type="text" :plain="false" size="mini" icon="el-icon-circle-plus"  :round="false" :circle="false" :disabled="false" @click="addListViewRow('${options.controlId}')"  > 新增 </el-button>
     </el-col>

    <el-col :span="24" v-if="deviceMode==='pc'">
      <div class="ant-table_container">
       <el-table   :data="formData.${options.controlId}"     ref="${options.controlId}"       >
          {{each options.columns}}
         ${($value.parentControlId=$data.options.controlId)==1?"":"" }
          {{tmpl($value) '#wmpDetailcodetmpl'}}
         {{/each}}
       <el-table-column prop="operation" fixed="right" label="操作" class-name="">
    <template _tmplitem="8" slot-scope="scope">
                                    <div _tmplitem="8" class="el-input el-input--small">
                                        <el-button style="margin-left:5px;" type="text" size="small" icon="el-icon-delete" :plain="false" :round="false" :circle="false" :disabled="false" @click="delListViewRow('${options.controlId}',scope.row)"> 删除 </el-button>
                                    </div>

    </template>
    </el-table-column>
       </el-table>
    </div>
    {{if options.isPage == true}}
      <div class="ant-table_footer" >
          <a-pagination
            :loading="controlData.${options.controlId}.pagination.isloading"
            v-model="controlData.${options.controlId}.pagination.currnet"
            :default-current="1"
            :total="controlData.${options.controlId}.pagination.total"
            show-quick-jumper
            @change="${options.controlId}handleTableChange"
            @showSizeChange="${options.controlId}showSizeChange"
            :pageSize="controlData.${options.controlId}.pagination.pagesize"
            show-size-changer
          />
       </div>
      ${addhandleTableChange(options.controlId,options.sourceApiId)}
    {{/if}}
</el-col>
    </script>
    <!-- 手机端 明细列表渲染 -->
    <script id="listviewMobilecodetmpl" type="type/x-jquery-tmpl">
       <el-col :span="24" v-if="deviceMode==='Mobile'" >
        <div   v-for="(item,index) in formData.${options.controlId}"  :key="index" style="width: 98%;padding: 8px;margin-bottom: 10px;
        border: 1px solid #d7dae2;
        border-radius: 0;">
        <div class="fr-card-index">${"{{index+1"}}} </div>
        <div :span="24" style="text-align: right;"> <el-button style="margin-left:5px;margin-top: 5px;" type="text" :plain="false" size="mini" icon="el-icon-delete"  :round="false" :circle="false" :disabled="false" @click="delListViewRow('${options.controlId}',item)"  > 删除</el-button> </div>
        {{each options.columns}}
        ${($value.parentControlId=$data.options.controlId)==1?"":"" }
        {{tmpl($value) '#listviewbasecodetmpl'}}
       {{/each}}
        <div  style="clear:both;height:0;font-size: 1px;line-height: 0px;"></div>
        </div>
       <el-col :xs="24" :md="24" :lg="24"  style="    text-align: center;">
        <el-button style="margin-left:5px;margin-top: 5px;    width: 95%;" type="text" :plain="false" size="mini" icon="el-icon-circle-plus"  :round="false" :circle="false" :disabled="false" @click="addListViewRow('${options.controlId}')"  > 新增${title } </el-button>
      </el-col>
   </el-col>

    </script>
    <!-- 基础控件渲染模板 -->
    <script id="listviewbasecodetmpl" type="type/x-jquery-tmpl">
        {{if  title!=''}}
            <el-col
          :md="24"
          :lg="24"
          class="${options.required == true?"required":""}"
        >
          ${title }
        </el-col>
          {{/if}}
      <el-col :span="24"
              style="padding:0px">
          <el-col :span="24"

                  style="${'height:'+(options.rowSpan !== undefined? 42 * options.rowSpan + 'px': '')}">

              <el-form-item label=""  :prop="'${parentControlId}.'+index+'.${dataIndex}'"  :rules="rules.${options.filed}" label-width="0px" >

              {{if type == 'input'}}
              <el-input placeholder="请输入${ title}内容" ${options.disabled?"disabled":""} v-model="item.${dataIndex}" maxlength="${options.dataLength}" ${getevent($data)} {{html options.tagattr}}></el-input>
              {{else type == 'textarea'}}
              <el-input type="textarea"
                        rows="${options.rows}"
                        placeholder="请输入${ title }内容" ${options.disabled?"disabled":""} v-model="item.${dataIndex}" maxlength="${options.dataLength}" ${getevent($data)} {{html options.tagattr}}>
              </el-input>
              {{else type == 'editor'}}
              <Editor ref="${dataIndex}"
                      :value.sync="item.${dataIndex}"></Editor>
              {{else type == 'select'}}
          <el-select placeholder="请选择${title}" ${options.disabled?"disabled":""} v-model="item.${dataIndex}" ${getevent($data)} {{html options.tagattr}}
               ${options.isMulty?"multiple":""}
              size="${options.butsize}"
              ${options.clearable?"clearable":""}
            ${options.isSearch?"filterable":""}
              ${options.collapsetags?" collapse-tags":""}
          ${options.allowcreate?"allow-create":""}
              default-first-option="${options.allowcreate}"
          style="width: 100%;">
          {{if options.isRemote==true}}
            <el-option  v-for="(item,index) in controlData.${dataIndex}" :key="index"
                         :label="item.${options.labelText}"
                        :value="item.${options.labelValue}">
              </el-option>
          {{else}}
             {{each options.options}}
              <el-option
                         label="${label}"
                        value="${label}">
              </el-option>
              {{/each}}
          {{/if}}
          </el-select>
              {{else type == 'date'}}
              {{if options.modeltype != 'range'}}
           <el-date-picker placeholder="${options.placeholder}"
                              format="${options.format}"
                              value-format="${options.format}"
                              type="${options.modeltype}"  style="width: 100%;"
                              ${options.disabled?"disabled":""} v-model="item.${dataIndex}" ${getevent($data)} {{html options.tagattr}} />
              {{else options.modeltype == 'range'}}
              <el-date-picker
                v-model="item.${dataIndex}"
                type="monthrange"
                format="${options.format}"
                value-format="${options.format}"
                range-separator="至"
                start-placeholder="${options.placeholder}" style="width: 100%;"
                end-placeholder="${options.placeholder}" ${getevent($data)} {{html options.tagattr}} ${options.disabled?"disabled":""}>
              </el-date-picker>
              {{/if}}
              {{else type == 'radio'}}
              <el-radio-group size="mini"
                              style="line-height:43px; display:block;" ${options.disabled?"disabled":""} v-model="item.${dataIndex}" ${getevent($data)} {{html options.tagattr}}>
          {{if options.isRemote==true}}
               <el-radio  v-for="(item,index) in controlData.${dataIndex}" :key="index"
                         :label="item.${options.labelText}"
                        :value="item.${options.labelValue}">
              </el-radio>
          {{else}}
              {{each options.options}}
                  <el-radio style="inline"
                            label="${label}">${ label }</el-radio>
                  {{/each}}
          {{/if}}
              </el-radio-group>
              {{else type == 'checkbox'}}
              <el-checkbox-group size="mini"
                                 style="line-height:43px;" ${options.disabled?"disabled":""} v-model="item.${dataIndex}" ${getevent($data)} {{html options.tagattr}}>
           {{if options.isRemote==true}}
                 <el-checkbox  v-for="(item,index) in controlData.${dataIndex}" :key="index"
                         :label="item.${options.labelText}"
                        :value="item.${options.labelValue}">
              </el-checkbox>
           {{else}}
              {{each options.options}}
                  <el-checkbox style="inline"
                               label="${label}" >${label}</el-checkbox>
                  {{/each}}
          {{/if}}
              </el-checkbox-group>
              {{else type == 'switch'}}
                <el-switch
                  v-model="item.${dataIndex}"
                  active-color="${options.activecolor}"
                  inactive-color="${options.inactivecolor}"
                 ${options.disabled?"disabled":""}
                >
                </el-switch>
              {{else type == 'colorpicker'}}
             <el-color-picker
              v-model="item.${dataIndex}"
              ${options.disabled?"disabled":""}
              size="${options.butsize}"
            >
            </el-color-picker>
               {{else type == 'slider'}}
            <el-slider
              v-model="item.${dataIndex}"
             ${options.range?"range":""}
              :max="${options.max}"
              :min="${options.min}"
              :step="${options.step}"
            >
            </el-slider>
              {{else type == 'rate'}}
              <el-rate ${options.readonly?"readonly='true' ":" "}   v-model="item.${dataIndex}" ${getevent($data)} {{html options.tagattr}}></el-rate>
              {{else type == 'inputnumber'}}
              <el-input-number ${options.disabled?"disabled":""}
                               :min="${options.min}"
                               :max="${options.max}"
                               label="${options.describe}"
                               :step="${options.step}"
                               v-model="item.${dataIndex}" ${getevent($data)} {{html options.tagattr}}></el-input-number>
              {{else type == 'timepicker'}}
              <el-time-select
              v-model="item.${dataIndex}"
              :picker-options="{
                start: '08:30',
                step: '00:15',
                end: '18:30'
              }"
              ${options.disabled?"disabled":""}
              ${getevent($data)} {{html options.tagattr}}
              placeholder="选择时间">
            </el-time-select>
              {{else type == 'user'}}
              <span class="ant-input-search ant-input-affix-wrapper" data-v-a1ccd506="" {{html options.tagattr}}><input placeholder="${options.precision}" v-model="item.${dataIndex}.text" type="text" readonly="readonly" class="ant-input"><span class="ant-input-suffix" @click="$refs.${dataIndex}dialog.visible = true"><i aria-label="图标: search" tabindex="-1" class="anticon anticon-search ant-input-search-icon"><svg viewBox="64 64 896 896" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></i></span></span>
              <zhlDialog title="${options.precision}"
                         ref="${dataIndex}dialog"
                         width="960px"
                         class="my-dialog">
                  <selector :typemode="1"
                            @confirm="selector${dataIndex}confirm"
                            @close="$refs.${dataIndex}dialog.visible = false"></selector>
              </zhlDialog>
              ${addselectorconfirm(dataIndex)}
              {{else type == 'department'}}
              <span class="ant-input-search ant-input-affix-wrapper" data-v-a1ccd506="" {{html options.tagattr}}><input placeholder="${options.precision}" v-model="item.${dataIndex}.text" type="text" readonly="readonly" class="ant-input"><span class="ant-input-suffix" @click="$refs.${dataIndex}dialog.visible = true"><i aria-label="图标: search" tabindex="-1" class="anticon anticon-search ant-input-search-icon"><svg viewBox="64 64 896 896" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></i></span></span>
              <zhlDialog title="${options.precision}"
                         ref="${dataIndex}dialog"
                         width="960px"
                         class="my-dialog">
                  <selector typemode="2"
                            @confirm="selector${dataIndex}confirm"
                            @close="$refs.${dataIndex}dialog.visible = false"></selector>
              </zhlDialog>
              ${addselectorconfirm(dataIndex)}
              {{else type == 'project'}}
              <span class="ant-input-search ant-input-affix-wrapper" data-v-a1ccd506="" {{html options.tagattr}}><input placeholder="${options.precision}" v-model="item.${dataIndex}.text" type="text" readonly="readonly" class="ant-input"><span class="ant-input-suffix"><i aria-label="图标: search" tabindex="-1" class="anticon anticon-search ant-input-search-icon"><svg viewBox="64 64 896 896" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></i></span></span>
              {{else type == 'cost'}}
              <span class="ant-input-search ant-input-affix-wrapper" data-v-a1ccd506="" {{html options.tagattr}}><input placeholder="${options.precision}" v-model="item.${dataIndex}.text" type="text" readonly="readonly" class="ant-input"><span class="ant-input-suffix"><i aria-label="图标: search" tabindex="-1" class="anticon anticon-search ant-input-search-icon"><svg viewBox="64 64 896 896" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></i></span></span>
              {{else type == 'choose'}}
              <span class="ant-input-search ant-input-affix-wrapper" data-v-a1ccd506="" {{html options.tagattr}}><input placeholder="${options.precision}" v-model="item.${dataIndex}.text" type="text" readonly="readonly" class="ant-input"><span class="ant-input-suffix"><i aria-label="图标: search" tabindex="-1" class="anticon anticon-search ant-input-search-icon"><svg viewBox="64 64 896 896" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></i></span></span>
              {{/if}}

              </el-form-item>

          </el-col>
      </el-col>
    </script>
    <!-- 整行控件渲染模板 -->
    <script id="rowcontrolcodetmpl" type="type/x-jquery-tmpl">
        <el-col :xs="${options.lg}"
        :md="${options.lg}"
        :lg="${options.lg}">
                <el-col :span="24"
                        style="${getrowcontrolcss($data)}">
                    {{if type == 'tree'}}
                    <el-tree></el-tree>
                    {{else type == 'partlayout' }}
                        {{tmpl($data) '#fromcodetmpl'}}
                    {{else type == 'imgage' }}
                    <img data-v-6c4399d0=""
                         src="http://localhost:8080/file/downloadImg?path=AttachmentFile%5C2021-01-11-12-30%5Ca54eb02e-faca-46a4-8262-e8ea6cefa217.jpg"
                         width="150px"
                         height="80px" />
                    {{else type == 'upFilesComp' }}
                        {{if options.uptype =='file'}}
                               <upFilesComp :fileListArr="formData.${options.filed}"></upFilesComp>
                        {{else options.uptype =='img'}}
                          <upManyImgComp  :fileListArr="formData.${options.filed}" :limit="1"></upManyImgComp>
                          {{else options.uptype =='arryimg'}}
                          <upManyImgComp :fileListArr="formData.${options.filed}"
                          ></upManyImgComp>
                       {{/if}}
                     ${setfromData(options,type,title)}
                    {{/if}}
                </el-col>
            </el-col>
            {{if type == 'button'}}
            <el-col :xs="${options.xs}"
        :md="${options.md}"
        :lg="${options.lg}">
                {{each options.buttons}}
                <el-button style="margin-left:5px;    margin-top: 5px;" size="mini"  ${getevent($data)} {{html options.tagattr}} type="${options.butType}"
                          size="${options.butsize}"
                          icon="${options.icon}"  :plain="${options.isplain}"
              :round="${options.isround}"
              :circle="${options.iscircle}"
              :disabled="${options.disabled}">
                      ${options.labelTitle}
                </el-button>
                {{/each}}
            </el-col>
            {{/if}}
    </script>
    <!-- 基础控件渲染模板 -->
    <script id="basecontrolcodetmpl" type="type/x-jquery-tmpl">
        <el-col :xs="${options.lg}"
        :md="${options.lg}"
        :lg="${options.lg}"
                style="padding:0px">
                {{if type=='barechart'}}
                <barechart
                :height="${options.height}"
                :title="'${title}'"
                :iconclass="'${options.iconclass}'"
                :iconcolor="'${options.iconcolor}'"
                :titlecolor="'${options.titlecolor}'"
                :decorationmodel="${options.decorationmodel}"
                :axistype="'${options.axistype}'"
                :axisdata="'${options.axisdata}'"
                :tooltip="'${options.tooltip}'"
                :tooltip_left="'${options.tooltip_left}'"
                :bordermodel="${options.bordermodel}"
              ></barechart>
              {{else type=='funnelechart'}}
              <funnelechart
              :height="${options.height}"
              :title="'${title}'"
              :iconclass="'${options.iconclass}'"
              :iconcolor="'${options.iconcolor}'"
              :titlecolor="'${options.titlecolor}'"
              :decorationmodel="${options.decorationmodel}"
              :tooltip="'${options.tooltip}'"
              :tooltip_left="${options.tooltip_left}"
              :bordermodel="${options.bordermodel}"
            ></funnelechart>
            {{else type=='gaugechart'}}
            <gaugechart
            :height="${options.height}"
            :title="'${title}'"
            :iconclass="'${options.iconclass}'"
              :iconcolor="'${options.iconcolor}'"
              :titlecolor="'${options.titlecolor}'"
              :decorationmodel="${options.decorationmodel}"
          ></gaugechart>
          {{else type=='linechart'}}
          <linechart
          :height="${options.height}"
          :title="'${title}'"
          :iconclass="'${options.iconclass}'"
          :iconcolor="'${options.iconcolor}'"
          :titlecolor="'${options.titlecolor}'"
          :decorationmodel="${options.decorationmodel}"
          :axistype="'${options.axistype}'"
          :axisdata="'${options.axisdata}'"
          :tooltip="'${options.tooltip}'"
          :tooltip_left="${options.tooltip_left}"
          :bordermodel="${options.bordermodel}"
        ></linechart>
        {{else type=='piechart'}}
        <piechart
        :height="${options.height}"
        :title="'${title}'"
        :iconclass="'${options.iconclass}'"
        :iconcolor="'${options.iconcolor}'"
        :titlecolor="'${options.titlecolor}'"
        :decorationmodel="${options.decorationmodel}"
        :tooltip="'${options.tooltip}'"
        :tooltip_left="${options.tooltip_left}"
        :bordermodel="${options.bordermodel}"
      ></piechart>
      {{else type=='radarechart'}}
      <radarechart
      :height="${options.height}"
        :title="'${title}'"
        :iconclass="'${options.iconclass}'"
        :iconcolor="'${options.iconcolor}'"
        :titlecolor="'${options.titlecolor}'"
        :decorationmodel="${options.decorationmodel}"
        :tooltip="'${options.tooltip}'"
        :tooltip_left="${options.tooltip_left}"
        :bordermodel="${options.bordermodel}"
    ></radarechart>
    {{else type=='scatterechart'}}
    <scatterechart
    :height="${options.height}"
    :title="'${title}'"
    :iconclass="'${options.iconclass}'"
    :iconcolor="'${options.iconcolor}'"
    :titlecolor="'${options.titlecolor}'"
    :decorationmodel="${options.decorationmodel}"
    :axistype="'${options.axistype}'"
    :axisdata="'${options.axisdata}'"
    :tooltip="'${options.tooltip}'"
    :tooltip_left="${options.tooltip_left}"
    :bordermodel="${options.bordermodel}"
  ></scatterechart>
  {{else type=='activeringchart'}}
  <activeringchart
  :height="${options.height}"
    :title="'${title}'"
    :iconclass="'${options.iconclass}'"
    :iconcolor="'${options.iconcolor}'"
    :titlecolor="'${options.titlecolor}'"
    :decorationmodel="${options.decorationmodel}"
></activeringchart>
{{else type=='waterlevelpondchart'}}
<waterlevelpondchart
:height="${options.height}"
:title="'${title}'"
:iconclass="'${options.iconclass}'"
:iconcolor="'${options.iconcolor}'"
:titlecolor="'${options.titlecolor}'"
:decorationmodel="${options.decorationmodel}"
:bordermodel="${options.bordermodel}"
></waterlevelpondchart>
{{else type=='capsulechart'}}
<capsulechart
:height="${options.height}"
:title="'${title}'"
:iconclass="'${options.iconclass}'"
:iconcolor="'${options.iconcolor}'"
:titlecolor="'${options.titlecolor}'"
:decorationmodel="${options.decorationmodel}"
:bordermodel="${options.bordermodel}"
></capsulechart>
{{else type=='flylinechart'}}
<flylinechart
:height="${options.height}"
:title="'${title}'"
:iconclass="'${options.iconclass}'"
:iconcolor="'${options.iconcolor}'"
:titlecolor="'${options.titlecolor}'"
:decorationmodel="${options.decorationmodel}"
:bordermodel="${options.bordermodel}"
></flylinechart>
{{else type=='conicalcolumnchart'}}
<conicalcolumnchart
:height="${options.height}"
:title="'${title}'"
:iconclass="'${options.iconclass}'"
:iconcolor="'${options.iconcolor}'"
:titlecolor="'${options.titlecolor}'"
:decorationmodel="${options.decorationmodel}"
:bordermodel="${options.bordermodel}"
></conicalcolumnchart>
{{else type=='percentpondchart'}}
<percentpondchart
:height="${options.height}"
:title="'${title}'"
:iconclass="'${options.iconclass}'"
:iconcolor="'${options.iconcolor}'"
:titlecolor="'${options.titlecolor}'"
:decorationmodel="${options.decorationmodel}"
:bordermodel="${options.bordermodel}"
></percentpondchart>
{{else type=='scrollboardchart'}}
<scrollboardchart
:height="'${options.height}'"
:title="'${title}'"
:iconclass="'${options.iconclass}'"
:iconcolor="'${options.iconcolor}'"
:titlecolor="'${options.titlecolor}'"
:decorationmodel="${options.decorationmodel}"
:bordermodel="${options.bordermodel}"
></scrollboardchart>
{{else type=='scrollrankingboardchart'}}
<scrollrankingboardchart
:height="${options.height}"
:title="'${title}'"
:iconclass="'${options.iconclass}'"
:iconcolor="'${options.iconcolor}'"
:titlecolor="'${options.titlecolor}'"
:decorationmodel="${options.decorationmodel}"
:bordermodel="${options.bordermodel}"
></scrollrankingboardchart>
{{else type=='digitalflopchart'}}
<digitalflopchart
:height="${options.height}"
:title="'${title}'"
:iconclass="'${options.iconclass}'"
:iconcolor="'${options.iconcolor}'"
:titlecolor="'${options.titlecolor}'"
:decorationmodel="${options.decorationmodel}"
:bordermodel="${options.bordermodel}"
></digitalflopchart>
              {{/if}}
        </el-col>
    </script>
    <script id="fromcodetmpl" type="type/x-jquery-tmpl">
        {{each list}}
        {{if type == 'listview'}}
        {{tmpl($value) '#listviewPCcodetmpl'}}
        {{tmpl($value) '#listviewMobilecodetmpl'}}
        ${setfromData(options,type,title)}
        {{else rowcontrolstr.indexOf(type + ',') >= 0}}
        {{tmpl($value) '#rowcontrolcodetmpl'}}
        {{else}}
        {{tmpl($value) '#basecontrolcodetmpl'}}
        {{/if}}
        {{/each}}

    </script>
    <script id="buildactioncode" type="type/x-jquery-tmpl">
        ${key}(page){
         {{if controlType=='listview'}}
            this.controlData.${controlId}.pagination.isloading=true;
         {{/if}}
        const param=  {
        {{each paramlist}}
        {{if children.length>0}}
         ${setbuildactionitem($value)}
        ${property}:{{tmpl($value) '#buildactionItemcode'}}
        {{/if}}
        {{if $index<(children.length-1)}} ,
        {{/if}}
        {{/each}}
        };
        {{if type=='swagger'}}
          this.$ajaxswagger("${sourceApi}",param).then(res=>{
if(res.code!=0){
this.$message.error(res.msg);
}
          {{if controlType=='listview'}}
this.formData.${controlId}=res.${swaggerconfig.list};
         this.controlData.${controlId}.pagination.isloading=false;
        this.controlData.${controlId}.pagination.total=res.${swaggerconfig.totalcount};
          {{else}}
        this.controlData.${controlId}=res.${swaggerconfig.list};
    {{/if}}

                 });
           {{else}}
         {{if controlType=='listview'&& isPage==true}}
         param.body.page=page;
         param.body.rows=this.controlData.${controlId}.pagination.pagesize;
        {{/if}}
         this.$apiComm("${sourceApi}",param).then(res=>{
if(res.code!=0){
this.$message.error(res.msg);
}
         {{if controlType=='listview'}}
        this.formData.${controlId}=res.data.list;
        this.controlData.${controlId}.pagination.isloading=false;
        this.controlData.${controlId}.pagination.total=res.totalcount;
        {{else}}
        this.controlData.${controlId}=res.data.list;
    {{/if}}
                 });
        {{/if}}
        }
    </script>
    <script id="buildactionItemcode" type="type/x-jquery-tmpl">
        {
        {{each children}}
        {{if variabletype=='Object' && children.length>0}}
         ${setbuildactionitem($value)}
        ${property}:{{tmpl($value) '#buildactionItemcode'}}
          {{if $index<(buildactionitem.children.length-1)}} ,
        {{/if}}
        {{else  paramvalue!=''}}
           {{if  paramvalue.indexOf('◇')>=0}}
            ${property}:"${paramvalue.substring(1,paramvalue.length)}"
           {{else    paramvalue.indexOf('◆')>=0}}
            ${property}:${paramvalue.substring(1,paramvalue.length)}
           {{else}}
           ${property}:this.formData.${paramvalue}
           {{/if}}
          {{if $index<(buildactionitem.children.length-1)}} ,
          {{/if}}
        {{/if}}

        {{/each}}
        }
    </script>
    <script id="buildAjaxcode" type="type/x-jquery-tmpl">
        const param=  {
        {{each paramlist}}
        {{if children.length>0}}
         ${setbuildactionitem($value)}
        ${property}:{{tmpl($value) '#buildactionItemcode'}}
        {{/if}}
        {{if $index<(children.length-1)}} ,
        {{/if}}
        {{/each}}
        };
        {{if type=='swagger'}}
          this.$ajaxswagger("${sourceApi}",param).then(res=>{
            if(res.code!=0){
            this.$message.error(res.msg);
            }

                 });
           {{else}}
         this.$apiComm("${sourceApi}",param).then(res=>{
if(res.code!=0){
this.$message.error(res.msg);
}
                 });
        {{/if}}
    </script>
    <div id="buildcode"></div>
    <script type="text/javascript">
        var swaggerconfig = {};
        var formData = {};
        var controlData = {};
        var eventdatafunction = {};
        var jsobject = {};
        var rules = {};
        var rowcontrolstr = 'tree,navmenu,blank,partlayout,dynamiclayout,calendar,imgage,upFilesComp,upImgComp,upManyImgComp'; ///占整行的控件
        var dynamicheight = 'partlayout,tree,calendar,imgage,upFilesComp,'; ///由内部控件撑高度的控件
        var minheight = 'partlayout,dynamiclayout,'
        var buildactionitem = {};
        var actionfunstr = "";
        var fromTableName = ""
        var defaultprops=['$user']
        function setbuildactionitem(item) {
            buildactionitem = item;
            return "";
        }
        ///大小写问题 需要替换
        var casestring = {
            zhldialog: 'zhlDialog',
            editor: 'Editor',
            showsizechange: 'showSizeChange'
        }
        function getStorageValue(key) {
            var strStorage = localStorage.getItem(key);
            if (strStorage == null) {
                strStorage = sessionStorage.getItem(key)
            }
            if (strStorage != null) {
                var obj = JSON.parse(strStorage);
                var content = {};
                if (obj.dataType === 'string') {
                    content = obj.content
                } else if (obj.dataType === 'number') {
                    content = Number(obj.content)
                } else if (obj.dataType === 'boolean') {
                    /* eslint-disable */
                    content = eval(obj.content)
                } else if (obj.dataType === 'object') {
                    content = obj.content
                }
                return content;
            }
        }
        function buildpubish(frominfo, jscode) {
            rules = {};
            fromTableName = frominfo.fromTableName;
            swaggerconfig = getStorageValue("swaggerconfig");
            actionfunstr = "";
            var isError = loadjscode(jscode);
            if (isError == false) {
                return false;
            }
            var htmlcode = $("#miantmpl").tmpl(frominfo).prop("outerHTML");
            for (var key in casestring) {
                var reg = new RegExp(key, "g");
                htmlcode = htmlcode.replace(reg, casestring[key]);
            }
            //  htmlcode = style_html(htmlcode, tabsize, tabchar, 80);
            var jscode = bulidjscode(frominfo);
            isError = loadjscode(jscode);
            if (isError == false) {
                return false;
            }
            //   jscode = jsbeautify(jscode);
            var buildObject = {
                htmlcode: htmlcode,
                jscode: "export default " + jscode,
                csscode: getcss()
            };
            return buildObject;
        }
        function loadjscode(jscode) {
            eventdatafunction = {};
            formData = {};
            controlData = {};
            jsobject = {
                data() {
                    return {}
                }, methods: {}
            }
            if (jscode != undefined && jscode != "") {
                try {
                    jsobject = eval("(" + jscode.replace('export default', '') + ")");
                } catch {
                    return false
                }
                if (jsobject.methods != undefined) {
                    eventdatafunction = Object.assign(jsobject.methods)
                }
            }
            return true
        }

        function bulidjscode() {
            var jscode = "";
            var newjsdata = Object.assign(jsobject.data());
            newjsdata["formData"] = formData;
            newjsdata["rules"] = rules;
            newjsdata["controlData"] = controlData;
            newjsdata["deviceMode"] = "pc";
            if(jsobject["props"]===undefined){
                jsobject["props"]=defaultprops
            }else{
                defaultprops.forEach(ee=>{
                    if(jsobject["props"].indexOf(ee)<0){
                       jsobject["props"].push(ee);
                    }
                })
            }
            var methodseventfunction = "";

            /////生成Actionfun 方法
            //for (var key in frominfo.actionfun) {
            //    var item = frominfo.actionfun[key];
            //    item.key = key;
            //    $("#buildcode").html('');
            //    $("#buildactioncode").tmpl(item).appendTo("#buildcode");
            //    eventdatafunction[key] = $("#buildcode").html().replace(/&gt;/g, ">");
            //    actionfunstr = actionfunstr + `${key}(1);`
            //}
            eventdatafunction["funmounted"] = `\n //系统方法页面加载方法 \n funmounted(){${actionfunstr}}`
            for (var key in eventdatafunction) {
                methodseventfunction = methodseventfunction == "" ? eventdatafunction[key].toString() : methodseventfunction + "," + eventdatafunction[key].toString();
            }
            jscode = jscode + "{";
            for (key in jsobject) {
                var codestr = jscode == "{" ? "" : ",";
                if (key == "data" && typeof (jsobject[key]) == "function") {
                    jscode = jscode + codestr + " data(){ return " + JSON.stringify(newjsdata) + "} ";
                } else if (typeof (jsobject[key]) == "function") {
                    jscode = jscode + codestr + jsobject[key].toString();
                } else if (key == "methods" && typeof (jsobject[key]) == "object") {
                    jscode = jscode + codestr + " methods:{" + methodseventfunction + "} ";
                } else if (typeof (jsobject[key]) == "object") {
                    if (jsobject[key] instanceof Array) {
                        jscode = jscode + codestr + " " + key + ":" + buildArray(jsobject[key]) + " ";
                    } else {
                        jscode = jscode + codestr + " " + key + ":" + bulidobject(jsobject[key]) + " ";
                    }
                } else if (typeof (jsobject[key]) != "undefined") {
                    jscode = jscode + codestr + " " + key + ":'" + jsobject[key].toString().replace(/\"/g, "\\\"") + "'";
                }
            }
            if (jsobject["mounted"] == undefined || jsobject["mounted"] == null) {
                jscode = jscode + `,mounted(){this.funmounted();}`;
            }
            jscode = jscode + "}";
            return jscode;
        }
        function buildArray(arry){
            var jscode = "[";
            for (let idex=0;idex<arry.length;idex++) {
                var codestr = jscode == "[" ? "" : ",";
                if (typeof ( arry[idex]) == "object") {
                    if (arry[idex] instanceof Array) {
                        jscode = jscode + codestr +  buildArray(arry[idex]) ;
                    } else {
                        jscode = jscode+codestr+   bulidobject(arry[idex]);
                    }
                }else{
                    jscode = jscode+codestr+"\""+arry[idex]+"\""
                }
            }
            jscode = jscode + "]";
            return jscode
        }
        function bulidobject(obj) {
            var jscode = "{";
            for (key in obj) {
                var codestr = jscode == "{" ? "" : ",";
                if (key == "formData") {
                    jscode = jscode + codestr + " " + key + ":'" + JSON.stringify(obj[key]) + "'";
                } else if (typeof (obj[key]) == "function") {
                    jscode = jscode + codestr + obj[key].toString();
                } else if (typeof (obj[key]) == "object") {
                    if (obj[key] instanceof Array) {
                        jscode = jscode + codestr + key + ":" + buildArray(obj[key]) + "";
                    } else {
                        jscode = jscode + codestr + key + ":" + bulidobject(obj[key]) + "";
                    }
                } else if (typeof (obj[key]) != "undefined") {
                    jscode = jscode + codestr + key + ":'" + obj[key].toString().replace(/\"/g, "\\\"") + "'";
                }
            }
            jscode = jscode + "}";
            return jscode
        }
        function getrowcontrolcss(element) {
            var cssstr = "padding:0px";
            cssstr = cssstr + (minheight.indexOf(element.type + ',') == 0 ? 'min-height:42px' : '');
            cssstr = cssstr + dynamicheight.indexOf(element.type + ',') >= 0 ? 'height:auto' : (element.options.rowSpan !== undefined ? "height" + element.options.rowSpan * 42 + 'px' : 'height:auto');
            return cssstr;
        }

        function getevent($obj) {
            var eventcode = "";
            if ($obj.eventlist == undefined) {
                return eventcode;
            }
            for (var i = 0; i < $obj.eventlist.length; i++) {
                if ($obj.eventlist[i].value != "" && $obj.eventlist[i].value != undefined) {
                    eventcode = eventcode + " @" + $obj.eventlist[i].label + '=' + $obj.eventlist[i].value + '';
                    if ($obj.eventlist[i].value.indexOf("(") < 0) {
                        if (eventdatafunction[$obj.eventlist[i].value] == undefined) {
                            eventdatafunction[$obj.eventlist[i].value] ="\n // "+$obj.title+$obj.eventlist[i].label+"事件方法 \n"+ $obj.eventlist[i].value + "() { }";
                        }else{
                            eventdatafunction[funname]="\n // "+$obj.title+$obj.eventlist[i].label+"事件方法 \n"+eventdatafunction[funname]
                        }
                    } else {
                        var funname =  $obj.eventlist[i].value;
                        funname = funname.substring(0, $obj.eventlist[i].value.indexOf("("));
                        if (eventdatafunction[funname] == undefined) {
                            var funparamstr = $obj.eventlist[i].value.replace(funname + "(", "").replace(")", "").split(",");
                            var funname = funname + "(";
                            if (funparamstr[0] != "") {
                                for (var i = 0; i < funparamstr.length; i++) {
                                    if (i == 0) {
                                        funname = funname + "param" + i;
                                    } else {
                                        funname = funname + ",param" + i;
                                    }
                                }
                            }
                            funname = funname + ")"
                            eventdatafunction[funname] ="\n // "+$obj.title+$obj.eventlist[i].label+"事件方法 \n"+ funname + "{ }";
                        }else{
                            eventdatafunction[funname]="\n // "+$obj.title+$obj.eventlist[i].label+"事件方法 \n"+eventdatafunction[funname]
                        }
                    }
                }
            }
            return eventcode;
        }
        ///选人选部门 点击确定事件
        function addselectorconfirm(filed) {
            var funname = `selector${filed}confirm`;
            if (eventdatafunction[funname] == undefined) {
                eventdatafunction[funname] = funname + `(selectlist) { \r\n this.formData.${filed}.text="";\n\r this.formData.${filed}.value=[]; \n\r for (let i = 0; i < selectlist.length; i++) {
                                 this.formData.${filed}.text=this.formData.${filed}.text==""?selectlist[i].Name:this.formData.${filed}.text+";"+selectlist[i].Name;\n\r  this.formData.${filed}.value.push(selectlist[i]);\n\r
                                }\n\r
                        this.$refs.${filed}dialog.visible = false;\n\r
                        }\n\r`;
            }
            return "";
        }
        function addhandleTableChange(controlId, sourceApiId) {
            var handlefunname = `${controlId}handleTableChange`;
            var showSizefunname = `${controlId}showSizeChange`;
            if (eventdatafunction[handlefunname] == undefined) {
                eventdatafunction[handlefunname] = `${controlId}handleTableChange(pagination) {
                                                this.${sourceApiId}(pagination)
                                            }`
            }
            if (eventdatafunction[showSizefunname] == undefined) {
                eventdatafunction[showSizefunname] = `${controlId}showSizeChange(page, pageSize) {
this.controlData.${controlId}.pagination.pagesize=pageSize;
                                                this.${sourceApiId}(1)
                                            }`
            }
            return "";
        }

        ///生成fromdata 结构
        function setfromData(options, type, title) {
            if (type == "listview") {
                if (options.controlId != undefined) {
                    if (formData[options.controlId] == undefined) {
                        formData[options.controlId] = []
                        formData["del" + options.controlId] = []
                        //if (options.sourceApi != undefined && options.sourceApi != '' && options.sourceApi.indexOf('/') < 0) {
                        controlData[options.controlId] = {};
                        controlData[options.controlId]["queryparam"] = {}
                        controlData[options.controlId]["scopedSlots"] = []
                        controlData[options.controlId]["pagination"] = { currnet: 1, total: 0, pagesize: 10, isloading: false }
                        for (var i = 0; i < options.columns.length; i++) {
                            var columnitem = options.columns[i];
                            if (columnitem.isScopedSlots) {
                                controlData[options.controlId].scopedSlots.push(columnitem.dataIndex);
                            }
                            if (columnitem.options != null && columnitem.options.filed != "" && columnitem.options.filed != undefined) {
                                rules[columnitem.options.filed] = []
                                if (columnitem.options.ruleslist != undefined) {
                                    rules[columnitem.options.filed] = JSON.parse(JSON.stringify(columnitem.options.ruleslist));
                                }
                                if (columnitem.options.required == true) {
                                    rules[columnitem.options.filed].push({
                                        required: true,
                                        message: columnitem.title + '必填',
                                        trigger: 'blur'
                                    });
                                }

                            }

                        }
                        eventdatafunction["load" + options.controlId] = `load${options.controlId}(){
if(this.formData.$tableNewId!=null&&this.formData.$tableNewId!=""){
 const param = {
                body: {$tableNewId:this.formData.$tableNewId},
            };
         this.$apiComm("${options.controlId}.querylist",param).then(res=>{
if(res.code!=0){
this.$message.error(res.msg);
return;
}
this.formData.${options.controlId}=res.data.list
});
}
}`;
                        actionfunstr = actionfunstr + `this.load${options.controlId}();`

                    }
                }
            }
            else if ('upFilesComp' == type) {
                if (options.filed != undefined) {
                    if (formData[options.filed] == undefined) {
                        formData[options.filed] = []
                    }
                }
            } else if ("user,department,project,cost,choose".indexOf(type) >= 0) {
                if (options.filed != undefined) {
                    if (formData[options.filed] == undefined) {
                        formData[options.filed] = { text: "", value: [] }
                    }
                }
            } else {
                if (options.filed != undefined) {
                    if (options.defaultValue != undefined) {
                        formData[options.filed] = options.defaultValue;
                    } else {
                        formData[options.filed] = "";
                    }
                }
            }
            if (options.sourceApiId != undefined && options.source.type != undefined && options.source.type != undefined) {
                options.source.controlType = type;
                options.source.key = options.sourceApiId;
                options.source.controlId = options.filed == undefined ? options.controlId : options.filed;
                options.source.isPage = options.isPage;
                $("#buildcode").html('');
                $("#buildactioncode").tmpl(options.source).appendTo("#buildcode");
                eventdatafunction[options.sourceApiId] = $("#buildcode").html().replace(/{controlId}/g, options.source.controlId).replace(/&gt;/g, ">");
                actionfunstr = actionfunstr + `this.${options.sourceApiId}(1);`
                if (type != 'listview') {
                    controlData[options.source.controlId] = [];
                }
            }
            if (options.filed != undefined) {
                rules[options.filed] = []
                if (options.ruleslist != undefined) {
                    rules[options.filed] = JSON.parse(JSON.stringify(options.ruleslist));
                }
                if (options.required) {
                    rules[options.filed].push({
                        required: true,
                        message: title + '必填',
                        trigger: 'blur'
                    });
                }
            }
            return "";
        }
        function buildsource(source) {
            $("#buildcode").html('');
            $("#buildAjaxcode").tmpl(source).appendTo("#buildcode");
            return $("#buildcode").html().replace(/&gt;/g, ">");
        }
        function getcss() {
            return $("#commoncss").html();
        }
    </script>
    <style id="commoncss">
  .chart-panel {
    background-position: center, right bottom;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, contain;
    box-shadow: rgba(0, 0, 0, 0.5) 0 0 30px 0;
    transition: 0.2s all ease-in-out;
    transform-origin: 0 0;
    width: 1920px;
    height: 1080px;
    position: absolute;
    background-color: white;
  }
    </style>
</body>

</html>
